
func moveCollect() {
    moveForward()
    collectGem()
}

func turnAround() {
    turnLeft()
    turnLeft()
}

moveForward()
moveForward()

moveCollect()
moveCollect()
moveCollect()
turnAround()

moveForward()
moveForward()
purplePortal.isActive = false

moveForward()
moveForward()
moveForward()

toggleSwitch()
turnAround()

moveForward()
purplePortal.isActive = true
moveForward()

moveCollect()
moveCollect()
moveCollect()
moveCollect()

